{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "79f802bc",
   "metadata": {},
   "outputs": [],
   "source": [
    "#元祖\n",
    "#1.它是和list几乎完全一样的序列数据\n",
    "#2.它与list不同的地方是，不可变（因为不可变，所以几乎没有方法）\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "075cd7d0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('1001', '1002', '1003') <class 'tuple'>\n"
     ]
    }
   ],
   "source": [
    "stu_id = '1001','1002','1003'\n",
    "print(stu_id,type(stu_id))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f977bbe0",
   "metadata": {},
   "outputs": [],
   "source": [
    "stu_id"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f1b8ff09",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1c5fe2df",
   "metadata": {},
   "outputs": [],
   "source": [
    "#字典\n",
    "1.创建字典的三种常见方法"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "b938345e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'stud_10001': 'wqy', 'stud_10002': 'zqy', 'stud_10003': 'lst'}"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#1.直接按照字典的格式创建 ： {key1:valuel , key2:value2,.....}\n",
    "stud_info = {\n",
    "   'stud_10001':'wqy',\n",
    "   'stud_10002':'zqy',\n",
    "   'stud_10003':'lst',\n",
    "}\n",
    "stud_info"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "9f42b53b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'stud_10001': 'wqy', 'stud_10002': 'zqy', 'stud_10003': 'lst'}"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#2.dict()函数来创建字典： idct(key1=value1,key2=value2,.....)\n",
    "stud_info_02 = dict(\n",
    "   stud_10001 = 'wqy',\n",
    "   stud_10002 = 'zqy',\n",
    "   stud_10003 = 'lst',\n",
    ")\n",
    "stud_info_02"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b66adb81",
   "metadata": {},
   "outputs": [],
   "source": [
    "#3.字典数据增加的方式：新建空字典 dict_name ={} ,dict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ee7978bc",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
